package design_pattern.strategy.demo_sort;

import java.util.Comparator;

public class Client {
    public static void main(String[] args) {
	Host[] hosts = {new Host("machine1",2000, 400, 2048, 1000000), new Host("machine2",2400, 333, 1024, 120000), new Host("machine3",3060, 400, 2048, 500000), new Host("machine4",3000, 667, 1024, 320000), new Host("machine5",3200, 800, 2048, 500000)};
	Comparator<Host> comparator = new DiskStrategy();
	java.util.Arrays.sort(hosts, comparator);
	display(hosts);
    }

    private static void display(Host[] hosts) {
	for(Host host : hosts){
	    System.out.println(host);
	}
    }
}
